package com.lantosec.hmrp.modules.internal.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.modules.internal.entity.InternalItem;
import com.lantosec.hmrp.modules.internal.entity.InternalNote;
import com.lantosec.hmrp.modules.internal.entity.InternalPlanItem;
import com.lantosec.hmrp.modules.internal.entity.InternalType;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * <p>
 * 项目分类表 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="InternalType对象", description="项目分类表")
public class InternalTypeVO extends BaseVO<InternalType> {
    private static final long serialVersionUID = 1L;


    public InternalTypeVO(InternalType entity){
        this.internalTypeId = entity.getInternalTypeId();
        this.internalTypeName = entity.getInternalTypeName();
        this.typeOrder = entity.getTypeOrder();
    }

    @Override
    public InternalType convertToEntity(){
        return new InternalType(this);
    }


    @ApiModelProperty(value = "项目分类ID")
    @TableId(value = "internal_type_id", type = IdType.AUTO)
    private Integer internalTypeId;

    @ApiModelProperty(value = "项目分类")
    private String internalTypeName;

    @ApiModelProperty(value = "排序")
    private Integer typeOrder;

    @ApiModelProperty(value = "获取考评方案下的考评项目列表")
    private List<InternalPlanItem> internalPlanItemList;
    @ApiModelProperty(value = "获取被考评对象下的考评记录列表")
    private List<InternalNoteVO> internalNoteVOList;
    private List<InternalItem> internalItems;
}
